/*取得icmp协议数据*/
#include <netdb.h>
#include <stdio.h>
main()
{
    struct protoent *protocol;
    protocol = getprotobyname("icmp");
    printf("protocol name :%s\n",protocol->p_name);
    printf("protocol number:%d\n",protocol->p_proto);
    printf("protocol alias :%s \n",protocol->p_aliases[0]);
}
